package com.yincheng.oes.business.dao;

import com.yincheng.oes.business.model.entity.ExportStudentPaperDO;
import com.yincheng.oes.business.model.entity.StudentPaperDO;
import com.yincheng.oes.business.model.query.StudentPaperReq;
import java.util.List;
import org.springframework.stereotype.Repository;

/**
 * @Author: yangsy
 * @Contact: 446948434@qq.com
 * @Date: 2021/8/27 20:44
 * @Version: 1.0
 * @Description:
 */
@Repository
public interface StudentPaperDao {

    /**
     * 查询用户已做完的试卷列表
     *
     * @param userId 用户id
     * @return 答卷列表
     */
    List<StudentPaperDO> searchStudentPapers(String userId);

    /**
     * 批量更新试卷导出状态
     *
     * @param resultPaperIds
     * @return
     */
    int batchUpdateStudentPaperExportStatus(List<String> resultPaperIds);

    List<ExportStudentPaperDO> batchSearchStudentPapers(List<String> resultPaperIds);

    /**
     * 查询学员完成试卷的总数
     * @param req StudentPaperReq
     * @return total
     */
    int countByParam(StudentPaperReq req);

    /**
     * 分页查询学员完成的试卷
     * @param req StudentPaperReq
     * @return 答卷列表
     */
    List<StudentPaperDO> searchStudentPapersByParam(StudentPaperReq req);
}
